package com.cskaoyan.bean;


import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.beanutils.BeanUtils;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@NoArgsConstructor
@Data
public class StatUserData {
    private List<String> columns;
    private List<Rows> rows;

    @NoArgsConstructor
    @Data
    public static class Rows {
        private String day;
        private Integer users;
    }

    public static StatUserData data(List<Rows> rows){
        StatUserData data = new StatUserData();
        data.setColumns(Arrays.asList("day","users"));
        data.setRows(rows);
        return data;
    }
}
